package filter;

import exception.AuthException;
import io.netty.handler.codec.http.FullHttpResponse;
import org.apache.http.HttpResponse;

public class HeaderHttpResponseFilter implements HttpResponseFilter {
    @Override
    public void filter(HttpResponse response) {
        //拦截返回数据, 返回码做处理
       if(response.getStatusLine().getStatusCode()==401) {
           throw new AuthException();
       }
    }
}